const YX_PREFIX = "cfb_yx_"
const SR_PREFIX = "cfb_sr_"
const MC_PREFIX = "cfb_mc_"

const getInfo = (key) => {
  let value = null;
  try {
    value = uni.getStorageSync(key) || {}
  } catch (e) {

  }
  return value;
}

/**
 * 获取英霞案采集信息
 */
export const getYxInfo = (idCard) => {
  return getInfo(YX_PREFIX + idCard)
}

/**
 * 设置英霞案采集信息
 */
export const setYxInfo = (idCard, data) => {
  uni.setStorageSync(YX_PREFIX + idCard,data)
}

/**
 * 获取圣瑞案采集信息
 */
export const getSrInfo = (idCard) => {
  return getInfo(SR_PREFIX + idCard)
}

/**
 * 设置圣瑞案采集信息
 */
export const setSrInfo = (idCard, data) => {
  uni.setStorageSync(SR_PREFIX + idCard,data)
}
/**
 * 获取秒城案采集信息
 */
export const getMcInfo = (idCard) => {
  return getInfo(MC_PREFIX + idCard)
}

/**
 * 设置秒城案采集信息
 */
export const setMcInfo = (idCard, data) => {
  uni.setStorageSync(MC_PREFIX + idCard,data)
}
